﻿using System;
using System.Text;

using mfRCF.Core;
using System.Net;
using System.IO;

namespace mfRCF.netmf
{
    public class mfHttpResponse : mfIHttpResponse
    {
        #region CTOR
        public mfHttpResponse(HttpListenerResponse response)
        {
            mfResponse = response;
        }
        #endregion

        #region Properties

        private HttpListenerResponse mfResponse { get; set; }

        #endregion

        #region mfIHttpResponse
        public Stream OutputStream
        {
            get 
            {
                return mfResponse.OutputStream; 
            }
        }

        public string StatusDescription
        {
            get
            {
                return mfResponse.StatusDescription;
            }
            set
            {
                mfResponse.StatusDescription = value; 
            }
        }

        public string ContentType
        {
            get
            {
                return mfResponse.ContentType;
            }
            set
            {
                mfResponse.ContentType = value; 
            }
        }

        public enumHttpStatusCode StatusCode
        {
            get
            {
                return (enumHttpStatusCode)mfResponse.StatusCode;
            }
            set
            {
                mfResponse.StatusCode = (int)value;
            }
        }

        public void Close()
        {
            mfResponse.Close();
        }

        public void Detach()
        {
            mfResponse.Detach();
        }
        #endregion
    }
}
